Basic Library for WinRT
Step 1 of 3: Creating an Application with a C1DropDown Control

In this step, you'll create a WinRT application in Visual Studio using DropDown for WinRT.

  1. In Visual Studio 2013 Select File | New | Project.
  2. In the New Project dialog box, expand a language in the left pane, under the language select Windows Store, and in the templates list select Blank App (XAML). Enter a Name and click OK to create your project.
  3. Open MainPage.xaml if it isn't already open. 
  4. Edit your opening <Page> tag to add the following namespace:
Markup
Copy Code
xmlns:Xaml="using:C1.Xaml"
  1. Locate the <Grid> </Grid> tags on your page and insert the following to define your Grid rows:
Markup
Copy Code
<Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
  1. Directly below the row definitions, add a CheckBox using the following markup:
Markup
Copy Code
<CheckBox Content="AutoClose - determines if C1DropDown will automatically close when focus is lost." IsChecked="{Binding ElementName=c1DropDown1, Path=AutoClose, Mode=TwoWay}" Margin="10"/>
  1. Use the following markup to add a C1DropDownButton control:
Markup
Copy Code
<Xaml:C1DropDownButton Grid.Row="1" Background="White" x:Name="c1DropDown1" Padding="2" Width="150" HorizontalAlignment="Center" VerticalAlignment="Center" > </Xaml:C1DropDownButton>
  1.  Next, we'll add some Header content to customize the C1DropDownButton.Header:
Markup
Copy Code
<Xaml:C1DropDownButton.Header>
  <Border x:Name="dropDownBorder" Background="White" />
</Xaml:C1DropDownButton.Header>

What You've Accomplished

In this step, you created a new Visual Studio 2013 Windows Store application, added a CheckBox control, and added and began customizing a C1DropDown control.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback